<extend name="Layout:base"/>

<block name="title">本系所有比赛</block>
<block name="css">

</block>
<block name="bsgl">active</block>
<block name="bxbs">active</block>
<block name="menu">
    <h5 class="breadcrumbs-title">本系所有比赛</h5>
    <ol class="breadcrumbs">
        <li class="active"><a href="{:U('Admin/Index/index')}">首页</a>
        </li>
        <li class="active">本系所有比赛
        </li>
    </ol>
</block>

<block name="main">
    <table class="striped responsive-table">
        <thead>
        <tr>
            <th data-field="id">No</th>
            <th data-field="id">类别</th>
            <th data-field="name">比赛名称</th>
            <th data-field="price">系部</th>
            <th data-field="price">负责人</th>
            <th data-field="price">报名人数</th>
            <th data-field="price">报名时间范围</th>
            <th data-field="price">操作</th>
        </tr>
        </thead>

        <tbody>
        <volist name="ret" id="vo">
            <tr>
                <td>{$i}</td>
                <td>
                    <eq name="vo.enclass" value="1">
                        个人
                        <else/>
                        团体
                    </eq>
                </td>
                <td>{:getEnrName($vo[enid])}</td>
                <td>信息系</td>
                <td>{$vo.pri}</td>
                <td>0/{$vo.num}</td>
                <td>{:date("Y-m-d",$vo[start])}~{:date("Y-m-d",$vo[end])}</td>
                <td>
                    <a class="waves-effect waves-light btn green"
                       href="{:U('Home/Details/index',array('enid'=>$vo[enid]))}">查看</a>
                    <a class="waves-effect waves-light btn orange"
                       href="{:U('Admin/MatchDetails/index',array('id'=>$vo[enid]))}">报名详情</a>
                    <eq name="Think.session.Rank" value="1">
                        <a class="waves-effect waves-light btn purple"
                           href="{:U('Admin/MatchMag/editMatch',array('enid'=>$vo[enid]))}">修改</a>
                        <a class="waves-effect waves-light btn teal"
                           href="{:U('Admin/MatchMag/unissue',array('enid'=>$vo[enid]))}">取消发布</a>
                        <a class="waves-effect waves-light btn red"
                           href="{:U('Admin/MatchMag/delete',array('enid'=>$vo[enid]))}">删除</a>
                    </eq>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
    <div class="row">
        <ul class="pagination center">
            {$page}
        </ul>
    </div>
</block>
<block name="js">
    <script>
        $(document).ready(function () {
            $('select').material_select();
        });
    </script>
</block>